package top.yongyan0624.service;

import top.yongyan0624.spring.Autowired;
import top.yongyan0624.spring.BeanNameAware;
import top.yongyan0624.spring.Component;
import top.yongyan0624.spring.InitializingBean;

/**
 * @author Yongyan
 * @description
 * @date 2022/2/8 15:19
 **/

@Component
public class UserService implements UserInterface, BeanNameAware, InitializingBean {

    @Autowired
    private OrderService orderService;

    private String beanName;

    @Override
    public void test() {
        System.out.println(orderService);
    }

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println("初始化了，做些什么..");
    }
}
